import Vue from 'vue'
import Vuex from 'vuex'
import user from '@/store/modules/user'
import setting from '@/store/modules/setting'

Vue.use(Vuex)

const store = new Vuex.Store({
// 公共属性
  state: {
    count: 10
  },
  // 挂载模块，每个模块中有自己的 state，getter，Mutations，actions
  modules: {
    user,
    setting
  }
})

export default store
